package web.simulation.memento;



public abstract class  AbstractCommand implements Command{
	
	protected OperationApi opertaion = null;
	
	public abstract int excuet(); 
	 
	public void setOperation(OperationApi opertaion){
		this.opertaion = opertaion;
	}
	@Override
	public void undo(Memento m) {
		this.opertaion.setMemento(m);
		
	}
	@Override
	public void redo(Memento m) {
		this.opertaion.setMemento(m); 
	}
	@Override
	public Memento createMemento() { 
		return (Memento) opertaion.createMemento();
	}
	
	
}
